<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
<head>
<title>编辑部门</title>
<style type="text/css">
  table {
    border-collapse: collapse;
    width: 300px
  }
  td {
    border: 1px solid
  }
</style>
</head>
<body>
  <fieldset>
    <s:form action="department!modify" method="post">
      <legend>编辑部门信息</legend>
      <s:textfield label="部门id" readonly="true" name="department.departmentId" value="%{department.departmentId}" />
      <s:textfield label="部门名称" name="department.departmentName" value="%{department.departmentName}" />
      <s:submit value="提交" />
    </s:form>
  </fieldset>
  <s:if test="department.employees!=null&&department.employees.size>0">
    <s:property value="'该部门包含以下员工id'" />
    <table>
      <tr>
        <th>员工id</th>
        <th>员工姓名</th>
      </tr>
      <s:iterator value="department.employees" var="employee">
        <tr>
          <td><s:property value="#employee.employeeId" /></td>
          <td><s:property value="#employee.employeeName" /></td>
        <tr>
      </s:iterator>
    </table>
  </s:if>
</body>
</html>
